#pragma once

#include <gtl/ui/skins/pane.h>
#include <gtl/script/script.h>

namespace gtl
{

class jscript;

namespace skins
{

class script
	: public manager<script, 'scrp'>
	, public gtl::script
{
	auto_reg_to_the_factory();

public:
	script();
	virtual ~script();

public:
	virtual unsigned int initialize(gtl::xml& node, wnd* parent_wnd);

public:
	virtual bool eval(const gtl::str& src);
	virtual bool call(const gtl::str& fun);

private:
	virtual bool init(const gtl::str& src) { return false; }

protected:
	static int m_counter;
	static gtl::script* m_jscript;
	static gtl::script* m_pyscript;
};

} // end of namespace skins

} // end of namespace gtl